package com.api.shopapi.service.impl;

import com.api.shopapi.entity.NursingRecordPositionLack;
import com.api.shopapi.entity.dto.AccountingRecordDTO;
import com.api.shopapi.mapper.NursingRecordPositionLackMapper;
import com.api.shopapi.mapper.NursingRecordPositionMapper;
import com.api.shopapi.service.NursingRecordPositionLackService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("NursingRecordPositionLackServiceImplOne")
public class NursingRecordPositionLackServiceImplOne implements NursingRecordPositionLackService {

    @Autowired
    private NursingRecordPositionLackMapper nursingRecordPositionLackMapper;


    @Override
    public
    int insert(NursingRecordPositionLack nursingRecordPositionLack){
        return nursingRecordPositionLackMapper.insert(nursingRecordPositionLack);
    }

    @Override
    public
    int delete(String nursingRecordPositionLackCode){
        return nursingRecordPositionLackMapper.delete(nursingRecordPositionLackCode);
    }

    @Override
    public
    int update(NursingRecordPositionLack nursingRecordPositionLack){
        return nursingRecordPositionLackMapper.update(nursingRecordPositionLack);
    }

    @Override
    public
    NursingRecordPositionLack getByCode(String nursingRecordPositionLackCode){
        return nursingRecordPositionLackMapper.getByCode(nursingRecordPositionLackCode);
    }

    @Override
    public
    List<NursingRecordPositionLack> listByNursingRecordPositionCode(String nursingRecordPositionCode){
        return nursingRecordPositionLackMapper.listByNursingRecordPositionCode(nursingRecordPositionCode);
    }


    @Override
    public
    List<NursingRecordPositionLack> listByGovCodeTime(String governmentCode, String startTime, String endTime){
        return nursingRecordPositionLackMapper.listByGovCodeTime(governmentCode,startTime,endTime);
    }

    @Override
    public PageInfo<NursingRecordPositionLack> pageByGovCode(int pageIndex, int pageSize, String governmentCode){
        PageHelper.startPage(pageIndex,pageSize);
        List<NursingRecordPositionLack> list = nursingRecordPositionLackMapper.listByGovCode(governmentCode);
        return new PageInfo<>(list);
    }



}
